import grace from "../../utils/grace.js"
grace.page({
      data: {
            integral: 0
      },
      onLoad: function (options) {
            wx.setNavigationBarTitle({
                  title: '我的积分',
            })
            this.loadData();
      },
      onShow: function () {
            this.loadData();
      },
      loadData: function () {
            this.$http.get('api/user/info', {}).then((res) => {
                  this.$data.integral = res.integral;
            })
      },
      toIntegral: function (e) {
            wx.navigateTo({
                  url: '../integral_log/integral_log',
            })
      },
      $onBackData(data) {
            if (data && data.isUpdate) {

            }
      }
})